{extend name="admin@public/base_content" /}
{block name="body">}
<body>
{include file="admin@public/common" /}
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
                <form id="form1" class="layui-form layui-form-pane" action="{:url('')}">
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" value="{$info.name|default=''}" required jq-verify="required" jq-error="请输入导航名称" placeholder="请输入导航名称" class="layui-input ">
                        </div>
                    </div>
                    <div class="layui-form-item ">
                        <label class="layui-form-label">描述</label>
                        <div class="layui-input-block">
                            <textarea name="remark" placeholder="请输入导航描述" class="layui-textarea">{$info.remark|default=''}</textarea>
                        </div>
                    </div>
                    <div class="layui-input-block">
                        <input type="hidden" name="nav_id" value="{$info.nav_id|default=''}">
                        <button class="layui-btn" jq-submit lay-filter="submit" jq-tab="true">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
</body>
{/block}
{block name="script"}
<!--kingeditor编辑器开始-->
<script>
    //document.domain = 'domain.com';
    KindEditor.ready(function(K) {
        window.editor = K.create('.king_content', {
            allowFileManager : true,
            langType : 'zh-CN',
            autoHeightMode : true,
            afterBlur: function () { this.sync(); },
        });
    });
</script>
<!--kingeditor编辑器结束-->
<script>
    layui.use('myform', function(){
        var $ = layui.jquery,
                form = layui.jqform;
        //各种基于事件的操作，下面会有进一步介绍
        //自定义
        form.verify({
            label:function (value) {
                if (value==''){
                    return '导航标识不能为空';
                }
                if(/.*[\u4e00-\u9fa5]+.*$/.test(value)){
                    return '导航标识不能含有汉字！';
                }
            }
        });
    });
</script>
{/block}